<template>
  <!-- <nav>顶部通栏</nav> -->
  <app-topnav />
  <!-- header头部栏 -->
  <app-header />
  <!-- 吸顶 -->
  <app-header-sticky />
  <main>
    <!-- 二级路由 -->
    <router-view></router-view>
  </main>
  <!-- <footer>底部</footer> -->
  <app-footer />
</template>

<script>
import appTopnav from '@/components/app-topnav.vue'
import AppHeader from '@/components/app-header.vue'
import AppFooter from '@/components/app-footer.vue'
import { useStore } from 'vuex'
import AppHeaderSticky from '@/components/app-header-sticky.vue'

// 布局容器
export default {
  // , AppHeaderSticky
  components: { appTopnav, AppHeader, AppFooter, AppHeaderSticky },
  name: 'xtx-layout',
  setup () {
    // 获取仓库并处触发action
    const store = useStore()
    // 触发action
    store.dispatch('category/getCateList')
  }
}
</script>

<style scoped lang="less">
// footer {
//   background-color: @sucColor;
//   .hoverShadow ();
// }
</style>
